 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>电影列表</title>

<style>
body {
            background-color: #f5f5f5;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }

        .header {
            background-color: #333;
            color: #fff;
            padding: 20px;
            text-align: center;
            position: relative; /* 使子元素可以使用绝对定位 */
        }

        .header h1 {
            margin: 0;
            font-size: 24px;
        }

        .header a {
            color: #fff;
            text-decoration: none;
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 16px;
        }

        .movie-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 20px;
        }

        .movie-card {
            width: 200px;
            margin: 10px;
            padding: 10px;
            background-color: #fff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            border-radius: 4px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .movie-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .movie-card img {
            max-width: 100%;
            height: auto;
            margin-bottom: 10px;
        }

        .movie-card h2 {
            margin: 0;
            font-size: 18px;
        }

        .movie-card p {
            margin: 5px 0;
            font-size: 14px;
            color: #777;
        }

        .movie-card button {
            padding: 8px 16px;
            background-color: #f44336;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        .movie-card button:hover {
            background-color: #c62828;
        }
        .movie-card a {
            display: inline-block;
            padding: 8px 16px;
            background-color: #f44336;
            color: #fff;
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }

        .movie-card a:hover {
            background-color: #c62828;
        }
</style>
</head>
<body>
<div class="header">
<a href="MovieFirstServlet">返回</a>
    <h1>电影列表</h1>
    
</div>
<div class="movie-container">
    <c:forEach items="${lm}" var="movie">
<div class="movie-card">
<img src="mImage/${movie.url}" />

<a href="PerServlet?mName=${movie.mName }&price=${movie.price }&mTime=${movie.mTime}">购票</a>

</div>
</c:forEach>
</div>



<script>

</script>
</body>
</html>